#pragma once

#include <string>
#include <future>
#include <cppconn/resultset.h>

class ConnObject;
namespace sql{
    class ResultSet;
}

class SqlOperation
{
public:
    SqlOperation(const std::string &sql);
    ~SqlOperation();
    std::future<std::unique_ptr<sql::ResultSet>> GetFuture();
    void ExecuteSql(ConnObject* connObj);
private:
    std::string sql_;
    std::promise<std::unique_ptr<sql::ResultSet>> promise_;
};


